package com.original.simuladores.dao.impl;

import java.util.List;

import org.hibernate.Session;

import com.original.simuladores.dao.ProductDao;
import com.original.simuladores.entities.Product;

public class ProductDaoImpl extends GenericDaoImpl<Product> implements ProductDao {

	@SuppressWarnings("unchecked")
	@Override
	public List<Product> getListActiveProducts() {
		Session session = sessionFactory.openSession();
		List<Product> lsProduct = session.createQuery("FROM Product WHERE fg_Active = 1").list();
		session.close();
		return lsProduct;
	}

}
